/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cnc;

/**
 *
 * @author PiotrGl
 */
public class Pozycja {
    private int x;
    private int y;
    private int z;

    private float xf;
    private float yf;
    private float zf;
    
    private int iloscKrokowNamm = 100;

    public int getIloscKrokowNamm() {
        return iloscKrokowNamm;
    }

    public void setIloscKrokowNamm(int iloscKrokowNamm) {
        this.iloscKrokowNamm = iloscKrokowNamm;
    }
    
    Pozycja(int x, int y, int z){
        this.x = x;
        this.y = y;
        this.z = z;     
        xf = x/iloscKrokowNamm;
        yf = y/iloscKrokowNamm;
        zf = z/iloscKrokowNamm;      
    }
     
    Pozycja(float xf, float yf, float zf){
        x = (int) xf*iloscKrokowNamm;
        y = (int) yf*iloscKrokowNamm;
        z = (int) zf*iloscKrokowNamm;
        this.xf = xf;
        this.yf = yf;
        this.zf = zf;
    }
    
    Pozycja(int x, int y, int z, int iloscKrokowNamm){
        this.iloscKrokowNamm = iloscKrokowNamm;
        this.x = x;
        this.y = y;
        this.z = z;     
        xf = x/iloscKrokowNamm;
        yf = y/iloscKrokowNamm;
        zf = z/iloscKrokowNamm;      
    }
     
    Pozycja(float xf, float yf, float zf, int iloscKrokowNamm){
        this.iloscKrokowNamm = iloscKrokowNamm;
        x = (int) xf*iloscKrokowNamm;
        y = (int) yf*iloscKrokowNamm;
        z = (int) zf*iloscKrokowNamm;
        this.xf = xf;
        this.yf = yf;
        this.zf = zf;
    }
    
    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getZ() {
        return z;
    }

    public void setZ(int z) {
        this.z = z;
    }

    public float getXf() {
        return xf;
    }

    public void setXf(float xf) {
        this.xf = xf;
    }

    public float getYf() {
        return yf;
    }

    public void setYf(float yf) {
        this.yf = yf;
    }

    public float getZf() {
        return zf;
    }

    public void setZf(float zf) {
        this.zf = zf;
    }
}
